home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / LISP Related / LISP Goodies / defsys 5.0 / P-defsys.l < prev    next >
Encoding:
Text File  |  1992-09-02  |  4.8 KB  |  125 lines  |  [TEXT/CCL2]

  1. ; -*- mode:     CL -*- ----------------------------------------------------- ;
  2. ; File:         P-defsys.l
  3. ; Description:  Load the Portable defsys
  4. ; Author:       Joachim H. Laubsch
  5. ; Created:       7-Sep-89
  6. ; Modified:     Tue Aug 11 12:04:19 1992 (Joachim H. Laubsch)
  7. ; Language:     CL
  8. ; Package:      CL-USER
  9. ; RCS $Header: $
  10. ;
  11. ;;; *************************************************************************
  12. ;;; Copyright (c) 1989, Hewlett-Packard Company
  13. ;;; All rights reserved.
  14. ;;;
  15. ;;; Use and copying of this software and preparation of derivative works
  16. ;;; based upon this software are permitted.  Any distribution of this
  17. ;;; software or derivative works must comply with all applicable United
  18. ;;; States export control laws.
  19. ;;; 
  20. ;;; This software is made available AS IS, and Hewlett-Packard Company
  21. ;;; makes no warranty about the software, its performance or its conformity
  22. ;;; to any specification.
  23. ;;; 
  24. ;;; Suggestions, comments and requests for improvements are welcome
  25. ;;; and should be mailed to laubsch@hplabs.com.
  26. ;;; *************************************************************************
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28.  
  29. (in-package "CL-USER")
  30.  
  31. (provide "P-defsys")
  32.  
  33. ;;"The directory in which sources and binaries for the portable defsystem facility are kept"
  34.  
  35. (defvar *defsystem-directory* 
  36.   (pathname   #-CCL "~/lisp/DEFSYS/"
  37.               #+(and CCL (not MCL))
  38.               (expand-logical-namestring "home;defsys:")
  39.               #+MCL "home;defsys:"
  40.               ))
  41. (or (member "expand-file-name" *modules* :test #'string=)
  42.     (load (format nil "~Abinary~Aexpand-file-name"
  43.           *defsystem-directory*
  44.           #+(or MCL CCL) ":"
  45.           #-(or MCL CCL) "/")))
  46.  
  47. (setq *defsystem-directory* (expand-file-name *defsystem-directory*))
  48.  
  49. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  50. ;;                          create DEFSYSTEM package
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52.  
  53. #-(or COMMON-LISP LCL4.0)
  54. (eval-when (compile eval load)
  55.   (unless (member "defpackage" *modules* :test #'string=)
  56.     (load (merge-pathnames (make-pathname :name "defpackage" :type "l")
  57.                *defsystem-directory*))))
  58.  
  59. (eval-when  (compile eval load)
  60.   (DEFPACKAGE "DEFSYSTEM"
  61.       (:NICKNAMES "DS")
  62.     (:IMPORT-FROM "USER" EXPAND-FILE-NAME)
  63.     #+LUCID (:IMPORT-FROM "LCL"  LCL:*LOAD-PATHNAME*)
  64.     (:EXPORT
  65.      "DEFSYSTEM" "UNDEFSYSTEM"
  66.      "LOAD-SYSTEM" "COMPILE-SYSTEM" "SHOW-SYSTEM" "FIND-SYSTEM" "SYSTEM-LOADED-P"
  67.      "LOAD-MODULE" "COMPILE-MODULE" "SHOW-MODULE" "FIND-MODULE" "MODULE-LOADED-P"
  68.  
  69.      "SYSTEM-COMPILED-P" "SYSTEM-LOADED-P"
  70.      "MODULE-COMPILED-P" "MODULE-LOADED-P"
  71.      "SYSTEM-DOCUMENTATION" "DOMODULES"
  72.  
  73.      "SYSTEM-NEEDED-SYSTEMS*"
  74.      "*SUFFIXES*"
  75.      "*ALL-SYSTEMS*" "*LOADED-SYSTEMS*" "*DEFSYSTEM-VERSION*"
  76.      "*SYSTEM-DIRECTORIES*" "*RELATIVE-BINARY-NAMESTRING*"
  77.      "EXPAND-FILE-NAME")
  78.     (:USE    #+(and COMMON-LISP MCL) "COMMON-LISP"
  79.          #+(and COMMON-LISP LUCID) "LCL"
  80.          #+(and COMMON-LISP LUCID) "LISP"
  81.              #-COMMON-LISP "LISP"
  82.              #+MCL "CCL"))
  83.  
  84.   (use-package (find-package "DEFSYSTEM")))
  85.  
  86. (eval-when (compile eval load)
  87.   (defvar DS:*suffixes*
  88.     #+ALLEGRO                             '("lisp"  . "fasl")
  89.     #+(or MCL CCL)               '("Lisp"  . "fasl")
  90.     #+(and (not ALLEGRO) (or HP HP300) (not LCL4.0))    '("l" . "b")
  91.     #+(and (not ALLEGRO) (or HP HP300) LCL4.0)          '("l" . "6bin")
  92.     #+(and (not ALLEGRO) EXCL)             '("cl"    . "fasl")
  93.     #+(and Lucid MC68000
  94.        (not (or HP HP300)))            '("lisp"  . "lbin")
  95.     #+(and Lucid VAX VMS)                  '("lisp"  . "vbin")
  96.     #+CMU                                  '("slisp" . "sfasl")
  97.     #+PRIME                                '("lisp"  . "pbin")
  98.     #+Symbolics                            '("lisp"  . "bin")
  99.     #+(and dec common vax (not ultrix))    '("LSP"   . "FAS")
  100.     #+(and dec common vax ultrix)          '("lsp"   . "fas")
  101.     #+KCL                                  '("lsp"   . "o")
  102.     #+Xerox                                '("lisp"  . "dfasl")
  103.     #+TI                                   '("lisp"  . "xfasl"))
  104.   )
  105. (defvar *defsystem-version* "$Revision: 5.0$")
  106.  
  107. (eval-when (eval load)
  108.   (let ((binary (merge-pathnames
  109.          (make-pathname :name "defsys" :type (cdr DS:*suffixes*))
  110.          (format nil
  111.              "~Abinary~A"
  112.              *defsystem-directory*
  113.              #+(or MCL CCL) ":"
  114.              #-(or MCL CCL) "/"))))
  115.     (if (probe-file binary)
  116.     (progn
  117.       (load binary)
  118.       (format t "~%Loaded Portable Defsystem: ~A~%" *defsystem-version*))
  119.       (warn "Failed to load DEFSYSTEM: binary not found at ~S:" binary))))
  120.  
  121.  
  122. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  123. ;;                              end of P-defsys.l
  124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  125.